package com.dynabook.ems.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dynabook.ems.common.BaseResponse;
import com.dynabook.ems.model.dto.MyBorrowedSampleListRequest;
import com.dynabook.ems.model.dto.ReturnMachineListDTO;
import com.dynabook.ems.model.dto.WorkOrderSampleApprovalListRequest;
import com.dynabook.ems.model.dto.WorkOrderSampleBatchApprovalRequest;
import com.dynabook.ems.model.entity.EmsMyBorrow;
import com.dynabook.ems.model.vo.EmsMyBorrowVO;
import com.dynabook.ems.model.vo.ReturnMachineListVO;
import com.dynabook.ems.model.vo.SampleListVO;
import com.dynabook.ems.model.vo.WorkOrderSampleApprovalListVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author tester
* @description 针对表【ems_my_borrow】的数据库操作Service
* @createDate 2025-07-01 13:58:28
*/
public interface EmsMyBorrowService extends IService<EmsMyBorrow> {


    EmsMyBorrowVO getCurrentUseList(String fixedNo);

    Boolean updateOldData();

    Page<ReturnMachineListVO> getMachineList(ReturnMachineListDTO returnMachineListDTO);
    
    /**
     * 获取当前用户已借的样品列表
     * @param request 查询请求
     * @param userId 用户ID
     * @return 样品列表
     */
    Page<SampleListVO> getMyBorrowedSampleList(MyBorrowedSampleListRequest request, String userId);

    /**
     * 分页查询样机工单待审批列表
     * @param request 查询请求
     * @return 样机工单待审批列表
     */
    Page<WorkOrderSampleApprovalListVO> getWorkOrderSampleApprovalList(WorkOrderSampleApprovalListRequest request);

    /**
     * 批量审批样机工单申请（同意或拒绝）
     * @param request 批量审批请求
     * @param httpServletRequest HTTP请求
     * @return 操作结果
     */
    BaseResponse<Boolean> batchSampleApproval(WorkOrderSampleBatchApprovalRequest request, HttpServletRequest httpServletRequest);

    /**
     * 分页查询样机工单代分配类别列表
     * @param request 查询条件
     * @return 样机工单代分配类别列表
     */
    Page<WorkOrderSampleApprovalListVO> getWorkOrderSampleAssignmentList(WorkOrderSampleApprovalListRequest request);

    /**
     * 样品管理员批量审批样机工单申请（同意或拒绝）
     * @param request 批量审批请求
     * @param httpServletRequest HTTP请求
     * @return 操作结果
     */
    BaseResponse<Boolean> sampleManagerBatchApproval(WorkOrderSampleBatchApprovalRequest request, HttpServletRequest httpServletRequest);
}
